<template>
  <view>
    <!-- #ifdef H5 -->
    <view class="back flex a-c j-c" @click="back">
      <u-icon name="arrow-left"></u-icon>
    </view>
    <!-- #endif -->
  </view>
</template>

<script>
export default {
  name: "BackIcon",
  methods: {
    back() {
      if (getCurrentPages().length > 1) uni.navigateBack();
      else this.$go2("/pages/main/tabbar/index/index", true);
    },
  },
};
</script>

<style>
.back {
  width: 60rpx;
  background-color: #fff;
  box-shadow: 1px 1px 5px #333;
  height: 60rpx;
  position: fixed;
  right: 10%;
  bottom: 15%;
  border-radius: 50%;
  z-index: 9999;
}
</style>
